package com.cashmanager.shared.vo;

import java.io.Serializable;

abstract public class ValueObject implements Serializable{
	public abstract String toXML();
	public String fieldToXml(String tag, Object svalue){
		if (svalue == null){
			return "<"+tag+"/>";
		}else{
			StringBuilder sb = new StringBuilder();
			return sb.append("<").
					  append(tag).
					  append(">").
					  append(svalue).
					  append("</").
					  append(tag).
					  append(">").toString();
		}
	}
}
